Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test path mapping in Bazel #18155

Closed
wants to merge 4 commits into from
Closed

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Apr 20, 2023

Add end-to-end tests to verify that --experimental_output_paths=strip works with sandboxed, sandboxed worker, and remote execution and results in the desired cache hits. Also adapt and enable config_stripped_outputs_test for Bazel (e.g. make it work on macOS).

This requires a minor changes: We ensure that full .jdeps are rewritten to contain unmapped paths even after a fallback to full classpath.

@fmeum
Copy link
Collaborator Author

fmeum commented Sep 7, 2023

CC @aranguyen

@aranguyen
Copy link
Contributor

aranguyen commented Oct 5, 2023

@fmeum Do we need this for bazelcon?

@fmeum
Copy link
Collaborator Author

fmeum commented Oct 5, 2023

@fmeum Do we need this for bazelcon?

It's just the combination of all the other required PRs + end-to-end tests. When the required PRs have been merged, we will probably want to merge the tests, but don't have to before BazelCon :-)

copybara-service bot pushed a commit that referenced this pull request Oct 5, 2023
`PathMapper`s rewrite paths in command lines to make them more cache friendly, which requires executor support to stage files at the rewritten paths. This commit wires up the `PathMapper` used by a given `Spawn` in `SpawnInputsExpander`, which takes care of this for inputs to `Spawn`s executed in a sandbox or remotely.

Constructs specific to Blaze, filesets and archived tree artifacts, are not covered by this change.

An end-to-end test will be added in #18155, but requires #19718, #19719, and #19721.

Work towards #6526

Closes #19718.

PiperOrigin-RevId: 571109361
Change-Id: Ia38464011f658178ab2a1981a3ddaf5aead7c8fa
@fmeum fmeum requested review from gregestren and removed request for a team and lberki November 6, 2023 21:53
@fmeum
Copy link
Collaborator Author

fmeum commented Nov 6, 2023

@gregestren Could you review this while Ara is OOO? It essentially consists of tests only, with one very minor change described in the PR description. Getting this merged would allow me to more effectively work on #19872 and get it in shape, including tests, before Ara is back.

@gregestren
Copy link
Contributor

Sure, I'll take a look today.

@gregestren gregestren added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally and removed awaiting-review PR is awaiting review from an assigned reviewer labels Nov 9, 2023
@fmeum
Copy link
Collaborator Author

fmeum commented Nov 11, 2023

@bazel-io flag

@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Nov 11, 2023
@keertk
Copy link
Member

keertk commented Nov 11, 2023

@bazel-io fork 7.0.0

@bazel-io bazel-io removed the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Nov 11, 2023
@github-actions github-actions bot removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Nov 13, 2023
bazel-io pushed a commit to bazel-io/bazel that referenced this pull request Nov 13, 2023
Add end-to-end tests to verify that `--experimental_output_paths=strip` works with sandboxed, sandboxed worker, and remote execution and results in the desired cache hits. Also adapt and enable `config_stripped_outputs_test` for Bazel (e.g. make it work on macOS).

This requires a minor changes: We ensure that full `.jdeps` are rewritten to contain unmapped paths even after a fallback to full classpath.

Closes bazelbuild#18155.

PiperOrigin-RevId: 582014351
Change-Id: If9c51acb090d9fc4bc86052143ad9960e44fd8a7
keertk pushed a commit that referenced this pull request Nov 13, 2023
Add end-to-end tests to verify that `--experimental_output_paths=strip`
works with sandboxed, sandboxed worker, and remote execution and results
in the desired cache hits. Also adapt and enable
`config_stripped_outputs_test` for Bazel (e.g. make it work on macOS).

This requires a minor changes: We ensure that full `.jdeps` are
rewritten to contain unmapped paths even after a fallback to full
classpath.

Closes #18155.

Commit
cab7c6b

PiperOrigin-RevId: 582014351
Change-Id: If9c51acb090d9fc4bc86052143ad9960e44fd8a7

Co-authored-by: Googler <gregce@google.com>
@fmeum fmeum deleted the bazel-path-stripping branch November 14, 2023 17:40
@iancha1992
Copy link
Member

The changes in this PR have been included in Bazel 7.0.0 RC5. Please test out the release candidate and report any issues as soon as possible. If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=last_rc.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Configurability Issues for Configurability team team-Remote-Exec Issues and PRs for the Execution (Remote) team team-Rules-Java Issues for Java rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants